package com.fandou.airobot.ui.widget.voice;

import android.view.animation.LinearInterpolator;

import com.lxj.xpopup.animator.PopupAnimator;

/**
 * @author Jm
 * @date 2020/7/10 11:40
 * @description
 */
public class VoicePopAnimator extends PopupAnimator {
    @Override
    public void initAnimator() {
        targetView.setAlpha(0);
    }

    @Override
    public void animateShow() {
        targetView.animate().alpha(1).setInterpolator(new LinearInterpolator()).setDuration(getDuration())
                .withLayer()
                .start();
    }

    @Override
    public void animateDismiss() {
        targetView.animate().alpha(0).setInterpolator(new LinearInterpolator()).setDuration(getDuration())
                .withLayer()
                .start();
    }
}
